package admin

import (
	"crypto/md5"
	"encoding/hex"
)

//生成密码Hash
func GeneratePassword(password string) string {
	md5Byte := md5.Sum([]byte(password))
	//取前10字节二次加密防止暴力破解
	md5Byte = md5.Sum(md5Byte[0:11])
	return hex.EncodeToString(md5Byte[0:16])
}
